package com.hu.video.controller;

import com.hu.video.entity.dto.VideoHotRankDTO;
import com.hu.video.service.Ranking.IVideoHotRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/hotRank")
public class HotRankController {
    @Autowired
    private IVideoHotRankService videoHotRankService;

    @GetMapping("/list")
    public List<VideoHotRankDTO> getHotRankList(
            @RequestParam(defaultValue = "comprehensive") String sortType,
            @RequestParam(defaultValue = "10") int limit) {
        return videoHotRankService.getHotRankList(sortType, limit);
    }
}